package com.cskaoyan.bean.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * @program: project2_market
 * @time: 2021/10/19
 * @author: yangshuai
 **/

@NoArgsConstructor
@Data
public class StatGoodsVo {


    private List<String> columns;
    private List<Rows> rows;

    public StatGoodsVo(List<String> columns, List<Rows> rows) {
        this.columns = columns;
        this.rows = rows;
    }

    @NoArgsConstructor
    @Data
    public static class Rows {
        private Double amount;
        private Integer orders;
        @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
        private Date day;
        private Integer products;

        public Rows(Double amount, Integer orders, Date day, Integer products) {
            this.amount = amount;
            this.orders = orders;
            this.day = day;
            this.products = products;
        }
    }

}
